<template>
  <div>{{ '地址管理' }}</div>
</template>

<script lang="ts" setup>
// import { shios } from '@/api/Shios';

test('api/');

// const res = await shios.post('users/login', {
//   data: { name: 'admin', password: '123456' },
// });
// console.log(res);

// eslint-disable-next-line require-jsdoc
function test(args: string) {
  let url = new URL(window.location.origin);
  if (!args.startsWith('http')) {
    // args = window.location.origin + args;
    url.pathname = args;
  } else {
    url = new URL(args);
  }
  console.log(url.toString());
}
</script>

<style lang="scss" scoped></style>
